﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq;

namespace Cid.Models
{
	public class ContextProxy
	{
		private static ContextProxy instance = new ContextProxy();

		public static string ConnectionString { get; set;}

		public static Func<DataContext> CreateNewContext { get; set; }

		public static DataContext CreateContext()
		{
			if (CreateNewContext != null)
				return CreateNewContext();
			return new DataContext(ConnectionString);
		}
	}
}
